package com.zf.zffencheng.model.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.util.Date;

/**
 * ClassName: TAccount <br/>
 * Description:  账户余额<br/>
 * date: 2021/5/11 16:29<br/>
 *
 * @author william <br/>
 */

@Data
@TableName(value = "t_account", schema = "fosiyun")
@NoArgsConstructor
public class TAccount {
    @TableId
    private Integer id;

    @TableField(value = "AccountId")
    private Integer accountId;

    private Integer type;

    @TableField(value = "createTime", fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(value = "Account")
    private BigDecimal account;
    @TableField(value = "SettleAccounts")
    private BigDecimal settleAccounts;

    public TAccount(Boolean bool){
        if(bool){
            this.account = BigDecimal.ZERO;
            this.settleAccounts = BigDecimal.ZERO;
        }
   }
}
